package com.franklin.maven.localcleaner.ui.tree;

import com.franklin.maven.localcleaner.api.swing.tree.HighlightTextTreeNode;
import com.intellij.icons.AllIcons;
import com.intellij.openapi.util.NlsSafe;
import com.intellij.ui.treeStructure.SimpleNode;

import java.util.Collections;
import java.util.List;

/**
 * Maven Jar 包树节点
 * @author: Ye Junhui
 * @since : 2022/4/2 0002
 */
public class MavenJarNode extends HighlightTextTreeNode<MavenJarNode> {

    private final String jarName;

    protected MavenJarNode(SimpleNode aParent, String jarName, List<String> highlightTextList) {
        super(aParent,highlightTextList, AllIcons.Nodes.PpLib);
        this.jarName = jarName;
    }

    public MavenJarNode(MavenNode mavenNode, String jarName) {
        this(mavenNode, jarName, Collections.emptyList());
    }

    @Override
    protected SimpleNode[] buildChildren() {
        return new SimpleNode[0];
    }

    @Override
    public @NlsSafe String getName() {
        return this.jarName;
    }
}
